﻿#pragma once
#include <QScopedPointer>
#include <QString>
#include <optional>

class LumFontIcon {
private:
    struct LumIconFont;
    struct LumFontIconData;
    QScopedPointer<LumFontIconData> d;
    LumFontIcon();
public:
    ~LumFontIcon();
    static LumFontIcon &Instance();
    std::optional<QString> AddFont(const QString &fontFile, const QString &codeMapFile);
    QStringList Families() const;
    char32_t IconCode(const QString &name, const QString &family) const;
    QChar IconChar(const QString &name, const QString &family) const;
    QStringList IconNames(const QString &family) const;
    QMap<QString, char32_t> CodeMap(const QString &family) const;
};
